package com.sunwoda.springbootredis.redislock;

import java.util.concurrent.TimeUnit;

/**
 * @author 2007130280
 */
public interface RedisLock {

    /**
    * @Description: 加锁
    * @Param:
    * @return:
    * @Author: SGR
    * @Date: 2021-09-15
    */
    boolean tryLock(String key, long timeout, TimeUnit timeUnit);

    /**
    * @Description: 释放锁
    * @Param:
    * @return:
    * @Author: SGR
    * @Date: 2021-09-15
    */
    void releaseLock(String key);
}
